import { RouterModule, Routes } from '@angular/router';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, Component } from '@angular/core';

import { AppComponent } from './app.component';
/* 加载路由配置 */
import { AppRoutingModule } from './app-routing.module';
import { NgZorroAntdModule, NZ_I18N, en_US } from 'ng-zorro-antd';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { registerLocaleData } from '@angular/common';
import en from '@angular/common/locales/en';


import { DetailComponent } from './detail/detail.component';
import { ListComponent } from './list/list.component';
import { ArticleComponent } from './article/article.component';
import { AboutComponent } from './about/about.component';
import { HomeComponent } from './home/home.component';
import { LoginComponent } from './login/login.component';
import { HeaderComponent } from './header/header.component';
import { FooterComponent } from './footer/footer.component';
import { ContentComponent } from './content/content.component';
import { AddArticleComponent } from './article/component/add-article/add-article.component';
import { ArticleListComponent } from './article-list/article-list.component';
import { UpdatePasswordComponent } from './update-password/update-password.component';
import { UserComponent } from './user/user.component';
import { IndexComponent } from './index/index.component';

registerLocaleData(en);


@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    LoginComponent,
    AboutComponent,
    ArticleComponent,
    ListComponent,
    DetailComponent,
    HeaderComponent,
    FooterComponent,
    ContentComponent,
    AddArticleComponent,
    ArticleListComponent,
    UpdatePasswordComponent,
    UserComponent,
    IndexComponent
  ],
  imports: [
    BrowserModule,
    // RouterModule.forRoot(AppRoutingModule),
    NgZorroAntdModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    AppRoutingModule
  ],
  exports: [
    RouterModule,
  ],
  providers: [{ provide: NZ_I18N, useValue: en_US }],
  bootstrap: [AppComponent]
})
export class AppModule { }
